




using System.Collections.Generic;
using System.Linq;
using Hotpot.Modules.Plugins.ViewModels;
using Hotpot.Plugins;
using Hotpot.ViewModels;

namespace Hotpot.Modules.Plugins.Extensions
{
    public static class HotpotViewModelExtensions
    {
        public static IEnumerable<PluginTemplate> GetPluginTemplates(this HotpotViewModel model)
        {
            PluginTemplatesViewModel viewModel = model.GetModelItem<PluginTemplatesViewModel>();

            if (viewModel != null)
                return viewModel.PluginTemplates;

            return Enumerable.Empty<PluginTemplate>();
        }
    }
}